package tiruvury.InterviewPrep.GenericAlgosTests;

import tiruvury.InterviewPrep.Generic.RestaurantMenu;
import tiruvury.InterviewPrep.HelperClasses.MenuItem;
import tiruvury.InterviewPrep.HelperClasses.MenuIterator;

public class OtherTests
{

	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		// ITERATOR PART 4: INSTANTIATING THE COLLECTION, THE ITERATOR and
		// ITERATING OVER THE COLLECTION
		RestaurantMenu menu = new RestaurantMenu();
		MenuIterator myItr = menu.iterator();

		System.out.println("__Restaurant Menu__");
		while (true)
		{
			MenuItem itm = myItr.next();
			if (itm != null)
			{
				System.out.println("Item Name: " + itm.name + " Price: $" + itm.price);
			}
			else
			{
				break;
			}
		}

	}

}
